package com.game.run.player;

import java.awt.Graphics;

import javax.swing.JFrame;

import com.game.controller.Game;

public class GameExecute extends JFrame {

	Game gamePanel = new Game();
	
	public GameExecute() {
		setSize(800,600);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
	}
		
	@Override
	public void update(Graphics g) {
		gamePanel.update(g);
	}
	
	@Override
	public void paint(Graphics g) {
		gamePanel.paint(g);
	}

	
	private void addComponente(){
	    getContentPane().add(gamePanel);
	}
	
	public void start(){
		addComponente();
		gamePanel.init();
		gamePanel.start();
		show();
	}
	
	public static void main(String[] args) {
		GameExecute game = new GameExecute();
		game.start();
	}
	
	
	
}
